import server from "../utils/request";
//获取标签管理列表
export function title_list(payload = {}) {
    return server.get('/cxy/api/findAllLabel', { params: payload })
}
//搜索标签
export function title_search(payload = {}) {
    return server.post('/cxy/api/findAllLabelName', payload)
}
//添加标签管理列表
export function title_add(payload = {}) {
    return server.post('/cxy/api/addLabel', payload)
}
//删除标签管理列表
export function title_delete(payload = {}) {
    return server.delete('/cxy/api/deleteLabel', { params: payload })
}
//编辑标签管理列表
export function title_update(payload = {}) {
    // var { id, ...data } = payload
    return server.put('/cxy/api/updateLabel', payload)
}
//改变标签状态
export function title_condition(payload = {}) {
    // var { id, ...data } = payload
    return server.put('/cxy/api/updateState', payload)
}
// =====================================================
//获取药品列表
export function drug_list(payload = {}) {
    return server.get('/cxy/api/findAllDrugs', { params: payload })
}
//删除药品管理列表
export function drug_delete(payload = {}) {
    return server.delete('/cxy/api/deleteDrugs', { params: payload })
}
//编辑药品管理列表
export function drug_update(payload: any = {}) {
    // var { id, ...data } = payload
    return server.put('/cxy/api/updateDrugs', payload)
}
//搜索药品列表
export function drug_search(payload = {}) {
    return server.post('/cxy/api/findAllDrugsName', payload)
}
//添加药品列表
export function drug_add(payload = {}) {
    return server.post('/cxy/api/addDrugs', payload)
}
// =======================================================
//获取咨询列表
export function consut_list(payload = {}) {
    return server.get('/cxy/api/findAllNews', { params: payload })
}
//删除咨询列表
export function consut_delete(payload = {}) {
    return server.delete('/cxy/api/deleteNews', { params: payload })
}
//搜索咨询列表
export function consut_search(payload = {}) {
    return server.post('/cxy/api/findAllNewsName', payload)
}
//添加咨询列表
export function consut_add(payload = {}) {
    return server.post('/cxy/api/addNews', payload)
}
//编辑咨询列表
export function consut_update(payload = {}) {
    // var { id, ...data } = payload
    return server.put('/cxy/api/updateNews', payload)
}
// =====================================================
//获取轮播图列表
export function swiper_list(payload = {}) {
    return server.get('/cxy/api/findAllCarousel', { params: payload })
}
//删除轮播图列表
export function swiper_delete(payload: any = {}) {
    return server.delete('/cxy/api/deleteCarousel', { params: payload })
}
//添加轮播图列表
export function swiper_add(payload = {}) {
    return server.post('/cxy/api/addCarousel', payload)
}
//搜索轮播图列表
export function swiper_search(payload = {}) {
    return server.post('/cxy/api/findAllCarouselName', payload)
}
//编辑轮播图列表
export function swiper_update(payload = {}) {
    // var { id, ...data } = payload
    return server.put('/cxy/api/updateCarousel', payload)
}
//改变轮播图状态
export function swiper_condition(payload = {}) {
    // var { id, ...data } = payload
    return server.put('/cxy/api/updateStates', payload)
}
// =====================================================

//获取角色列表
export function role_list(payload = {}) {
    return server.get('/cxy/api/findAllRole', { params: payload })
}
//删除角色列表
export function role_delete(payload: any = {}) {
    return server.delete('/cxy/api/deleteRole', { params: payload })
}
//添加角色列表
export function role_add(payload = {}) {
    return server.post('/cxy/api/addRole', payload)
}
//编辑角色列表
export function role_update(payload: any = {}) {
    // var { id, ...data } = payload
    return server.put('/cxy/api/updateRole', payload)
}
// 修改角色权限
export function role_saveRole(payload: any = {}) {
    return server.post('/cxy/api/updatePerm', payload)
}


